package com.ianmoone.designPatterns.observer;

import java.util.Observable;
import java.util.Observer;

public class Observer1 implements Observer {
	
	public void registerSubject(Observable observable){
		observable.addObserver(this);
	}

	@Override
	public void update(Observable o, Object arg) {
		if(o instanceof SubjectForSSQ){
			SubjectForSSQ subjectForSSQ = (SubjectForSSQ)o;
			System.out.println("subjectFor3d's msg -- >" + subjectForSSQ.getMsg());
		}
		
	}

}
